package com.xo.mall.controller.pms;

import com.xo.common.Result.ResultResponse;
import com.xo.common.pojo.dto.CreateCategoryDto;
import com.xo.mall.server.PmsCategoryService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/mall/pms")
@Tag(name = "分类管理")
public class PmsCategoryController {

    @Resource
    private PmsCategoryService pmsCategoryService;

    @PostMapping("createCategory")
    @Operation(summary = "创建分类", description = "创建分类")
    public ResultResponse<Object> createCategory(@RequestBody CreateCategoryDto createCategoryDto) {
        return pmsCategoryService.createCategory(createCategoryDto);
    }


}
